package com.wu.mvp.module.main;

import android.os.Handler;
import android.support.annotation.NonNull;

import com.wu.mvp.app.base.list.BaseListPresenter;


public class MainPresenter extends BaseListPresenter<MainActivity, String> {

    @Override
    protected void onCreateView(@NonNull MainActivity view) {
        super.onCreateView(view);
        getAdapter().addAll(new String[]{"sorry", "thank"});
    }

    @Override
    public void onRefresh() {
        super.onRefresh();
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                getAdapter().add("ok");
                refreshSuccess();
            }
        }, 2000);
    }
}
